package com.serial.comm.modular.serialPort.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.serial.comm.core.constants.SystemConstants;
import com.serial.comm.modular.serialPort.dao.TelegramIllegalMapper;
import com.serial.comm.modular.serialPort.enums.TelegramEnum;
import com.serial.comm.modular.serialPort.model.Telegram;
import com.serial.comm.modular.serialPort.model.TelegramIllegal;
import com.serial.comm.modular.serialPort.service.ITelegramIllegalService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 不合法的单一电报信息表 服务实现类
 * </p>
 *
 * @author chentl123
 * @since 2020-02-23
 */
@Service
public class TelegramIllegalServiceImpl extends ServiceImpl<TelegramIllegalMapper, TelegramIllegal> implements ITelegramIllegalService {

    @Override
    public Page<TelegramIllegal> getIllegalTelegramList(Page<TelegramIllegal> page) {
        Wrapper<TelegramIllegal> wrapper = new EntityWrapper<>();
        wrapper.orderBy(SystemConstants.Value.COLUMNS_ID, false);
        Page<TelegramIllegal> list = selectPage(page, wrapper);
        return list;
    }

}
